package com.ce.pms.renovation.model;

import com.ce.pms.common.model.HmEmployeeDomain;
import com.ce.pms.common.model.SysInfo;
import com.sitechasia.webx.core.model.IDomainObject;
import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="RM_FOLLOW")
public class ViolationFollowDO
  implements IDomainObject
{
  private static final long serialVersionUID = -97743381L;

  @Id
  @GeneratedValue
  @Column(name="FOLLOW_ID")
  private Long keyword;

  @ManyToOne(fetch=FetchType.LAZY)
  @JoinColumn(name="VIOLATION_ID")
  public RenovateViolationDO renovateViolationDO;

  @ManyToOne(fetch=FetchType.LAZY)
  @JoinColumn(name="EMPLOYEE_ID")
  private HmEmployeeDomain follower;

  @Column(name="DESCRIPTION", length=100)
  private String description;

  @Temporal(TemporalType.DATE)
  @Column(name="FOLLOW_DATE", nullable=false)
  private Date followDate;

  @Embedded
  @AttributeOverride(name="sysDate", column=@Column(name="SYS_DATE"))
  private SysInfo sysInfo;

  public ViolationFollowDO(Long keyword)
  {
    this.keyword = keyword;
  }

  public Long getKeyword() {
    return this.keyword;
  }

  public void setKeyword(Long keyword) {
    this.keyword = keyword;
  }

  public String getDescription() {
    return this.description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public SysInfo getSysInfo() {
    return this.sysInfo;
  }

  public void setSysInfo(SysInfo sysInfo) {
    this.sysInfo = sysInfo;
  }

  public HmEmployeeDomain getFollower() {
    return this.follower;
  }

  public void setFollower(HmEmployeeDomain follower) {
    this.follower = follower;
  }

  public Date getFollowDate() {
    return this.followDate;
  }

  public void setFollowDate(Date followDate) {
    this.followDate = followDate;
  }

  public RenovateViolationDO getRenovateViolationDO() {
    return this.renovateViolationDO;
  }

  public void setRenovateViolationDO(RenovateViolationDO renovateViolationDO) {
    this.renovateViolationDO = renovateViolationDO;
  }
}